# Usage: ancmed.tcl

if {![info exists eWorkDir]} {set eWorkDir [file dirname [info script]]}

package require DPeye

create {
	outputFile ancmed.ps 
	mapFile ancmed.map
	title "Ancient Mediterranean, designed by Don Hessong"
	creator "Mario Huys (woelpad@yahoo.com)"
	$MapDrawingScale 1 $MapUnitScale .7 $MapSupplyScale .7
	$FrameThickness 6
	images {
		chart {ancmed.base.ps {scan {17 12 1047 674} {} {part1 part2 part3} 
			{np newpath cp closepath mt moveto li lineto ct curveto df fill de eofill ds stroke}
			{Continentcolor {df de} Landcolor {df de} Seawater {df de} Black {ds {Arrowcolor df de}} Riverwater ds}} {} {3 0 0 0 6/7. 1 7}}
		coordinates {ancmed.base.ps {scan {} {provinces INFO supplies TLA powers COUNTRY}} {} {0 0 0 480 1 10/7.}}
	}
	borders {
		seas {image {chart Seawater} SeaBlue Border} 
		lands {image {chart Landcolor} LandBrown Border}
		borders {image {chart Black} {} Border}
		rivers {image {chart Riverwater} {} Border Blue}
		arrows {image {chart Arrowcolor} Black}
	}
	locationTypes {
		Supplies {number 0 name 0 draw 1 define -1}
		Territories {number 0 name 1 populate 0 info 1}
	}
	locations {
		supplies {image {coordinates supplies} Supplies s {Blue {} S}}
		coasts {image {coordinates provinces} Territories c {Red DarkGreen AF} {
			SAG TAR MAS ETR ROM NEA APU RAV VEN DAL EPI ATH {SPA 0 -6} MAC 
			DAC CHE SIP BIT BYZ MIL ISA CAP ANT SID TYE JER NAB PET
			SIN THE BAY MEM ALE CYR LEP NUM THA CAR MAU
		}}
		lands {image {coordinates provinces} Territories l {Green DarkGreen A} {
			LUS GAU RHA VIN ILL SAM ARM GAL DAM ARA MAR PHA SAH CIR
		}}
		waters {image {coordinates provinces} Territories w {White White F} {
			IBE BER LIG TYN PUN AUS ION ADR MES AEG BLA MIN CIL SYR
			GOP REE EGY LIB GOS GOT
		}}
		islands {image {coordinates provinces} Territories i {Magenta DarkGreen AF} {
			COR SAD SIC CRE CYP
		}}
		atols {image {coordinates provinces} Territories a {Yellow White AF} {
			BAL
		}}
	}
	units {
		fleet {F ManOfWar}
	}
	frame {bbox {} LandBrown FrameBorder}
	layout {corner retreats} fontSize 8
	nrOfOwnerSupplies 15 pageMarginHeight 50
	orderHasHeading 2
	drawLayoutBorder 0 composed 0 printLayout 0 testBorder 0 
	addPage 1 pageContents {
		"\{"

		"200 40 DrawFleet"
		"200 40 180 140 ArrowPropose"
		"200 40 100 20 ArrowRetreat"
		"200 40 300 60 ArrowMove"
		
		"180 140 DrawArmy"
		"ProposePhase"
		"180 140 160 240 ArrowMove"
		"RetreatPhase"
		"180 140 80 120 ArrowMove"
		"MovePhase"
		"180 140 280 160 ArrowMove"

		"300 90 DrawFleet"
		"300 90 200 40 180 140 ArrowSupport"
		"300 120 DrawArmy"
		"300 120 180 140 ArrowHold"
		"300 150 DrawFleet"
		"300 150 180 140 160 240 ArrowConvoy"

		"\} dup exec -40 200 translate FailedOrder exec OkOrder 40 -200 translate"
				
		"400 200 DrawFleet"
		"400 200 ArrowArrive"
		"400 230 DrawArmy"
		"400 230 ArrowDepart"
		"400 260 DrawFleet"
		"400 260 ArrowRetreatArrive"
		"400 290 DrawArmy"
		"400 290 ArrowRetreatDepart"
		
		"500 200 DrawFleet"
		"500 200 BuildUnit"
		"500 230 DrawArmy"
		"500 230 DestroyUnit"
		"500 260 DrawFleet"
		"500 260 DisbandUnit"
		"500 290 DrawArmy"
		"500 290 RemoveUnit"
		"500 320 DrawFleet"
		"500 320 FindUnit"
		"500 350 DrawArmy"
		"500 350 LoseUnit"
		"500 380 DrawFleet"
		"500 380 QueryUnit"
    }
}
